<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
/*    function demo(a,b) {
        var sum =a+b;
        return sum;
    }
    var v1 = demo(20,10);
    alert(v1);*/
function demo() {
    var a = 10;
    var b = 20;
    var sum = a+b;
    alert(sum);
}
</script>
<form>
    <input type="button" value="按钮" onclick="demo()">
</form>

<!--<button onclick="demo()"></button>-->

</body>
</html>